#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
map<int, int> mp;

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    
    int x;
    int res = 0;
    for(int i = 0; i < 5; i ++){
        scanf("%d", &x);
        if(!mp.count(x)){
            mp[x] = 1;
            res ++;
        }
    }
    printf("%d\n", res);

    return 0;
}